import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import HelloMobike from '@/components/HelloMobike'
import AdminAuth from '@/pages/AdminAuth'
import AdminUser from '@/pages/AdminUser'
import AdminRole from '@/pages/AdminRole'
import SubAll from '@/pages/SubAll'
import SubBackup from '@/pages/SubBackup'
import SubRecovery from '@/pages/SubRecovery'
import SubLog from '@/pages/SubLog'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    }, {
      path: '/about',
      name: 'HelloMobike',
      component: HelloMobike
    }, {
      path: '/AdminAuth',
      name: 'AdminAuth',
      component: AdminAuth,
      children: [
        {
          path: '/',
          component: SubAll
        },
        {
          path: 'backup',
          component: SubBackup
        },
        {
          path: 'recovery',
          component: SubRecovery
        },{
          path: 'log',
          component: SubLog
        }
      ]
    }, {
      path: '/AdminUser',
      name: 'AdminUser',
      component: AdminUser
    }, {
      path: '/AdminRole',
      name: 'AdminRole',
      component: AdminRole
    }
  ]
})
